package org.edu.modules.enroll.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

public class OSSConfig {
    public OSS ossClient(){
        // Endpoint以杭州为例。
        String endpoint = "oss-cn-beijing.aliyuncs.com";
        // 阿里云主账号AccessKey
//        String accessKeyId = "LTAI5tMx4syUjWBswZjWLiZh";
//        String accessKeySecret = "4sikztCpi8oYo7XLFDEmF0esBrZaQA";
//        String accessKeyId = "LTAI5tPnLGtPS6r8BpncZMrm";
//        String accessKeySecret = "BAJbUlVLXD6or53Zcw1nC8uI87UpOs";
        String accessKeyId = "LTAI5t7dUBXYJA3UTpUBkTLG";
        String accessKeySecret = "VVNmOcJa5ESbwJWiakRGscEO5uTRHW";
        // 创建OSSClient实例。
        OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
        return ossClient;
    }

}
